<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:include="include :: header"></head>
<style>
    /*重新设置样式*/
    .form-control {
        width: 196px !important;
        height: 34px !important;
        padding: 10px !important;
    }

    #recommendtable {
        box-sizing: border-box !important;
        width: 100% !important;
        margin-bottom: 1rem !important;
        color: #212529 !important;
        border-collapse: collapse !important;
        display: table !important;
        border-spacing: 2px !important;
        border-color: grey !important;
        text-align: left !important;
    }

    #recommendtable th {
        height: 50px;
    }

    #recommendtable tr {
        height: 35px;
        display: table-row;
        vertical-align: inherit;
        border-color: inherit;
        border-top-color: inherit;
        border-right-color: inherit;
        border-left-color: inherit;
        border-bottom: 2px #F3F1F1 solid;
    }

    #recommendtable td {
        font-size: 16px;
    }

    #recommendtable tr:nth-child(odd) {
        background: #FFFFFF !important;
    }

    #recommendtable tr:nth-child(even) {
        background: #FFFFFF !important;
    }

    .showinfo, .hideinfo {
        cursor: pointer;
        text-align: center;
    }

    /*.fixed-table-container .no-records-found>td:last-of-type{display:block !important;position:absolute;width:100%;}*/
    /*.fixed-table-container{height:auto !important;}*/
    /*p{margin-bottom:0;}*/
    /*table thead, tbody tr {*/
    /*display:table;*/
    /*width:100%;*/
    /*table-layout:fixed;*/
    /*}*/
    /*!**注释6.有事会错位，根据情况适当调整这里**!*/
    /*table thead {*/
    /*width: calc( 100% - 0.4em )*/
    /*}*/
</style>
<body class="hold-transition skin-blue sidebar-mini">
<section class="content-header">
    <h1 style="display: inline-block">库存分类明细</h1>

    <button onclick="javascript:window.history.back();" type="button" class="btn btn-success"
            style="text-align:center;vertical-align:middle;font-size:30px;position:absolute;right:3%;display: inline-block;background-color: transparent;border: none;color: #5c5c5c;outline:none;">
        <i style="-moz-transform:scaleX(-1);-webkit-transform:scaleX(-1);-o-transform:scaleX(-1);transform:scaleX(-1);filter:FlipH;"
           class="glyphicon glyphicon-share-alt"></i><span
            style="margin-left: 5px;font-size: 16px;position: absolute;top: 20%;">返回</span>
    </button>
</section>
<section class="content">
    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-body">
                    <table id="bootstrap-table" style="table-layout: fixed;"></table>
                </div>
            </div>
        </div>
    </div>
</section>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
    let table;

    /**
     * 就绪函数
     */
    $(function () {
        /**
         * 加载列表
         */
        table = js.table.init({
            url: ctx + "overview/statistical/matYingKouInvClassDetailsList",
            pageSize: 300,
            showColumns: true,
            showExport: false,
            columns: [
                {
                    title: '序号', field: 'ityId', width: '50',
                    formatter: function (value, row, index) {
                        return index + 1;
                    }
                },
                {
                    title: '分类',
                    field: 'type',
                    width: '120',
                    sortable: true,
                    formatter: function (value, row) {
                        return value;
                    }
                },
                {
                    title: '重量（单位：吨）',
                    field: 'allWeight',
                    sortable: true,
                    formatter: function (value, row) {
                        if(value === null){
                            return "--";
                        }
                        return parseFloat(value);
                    }
                },
                {
                    title: '营口重量（单位：吨）',
                    field: 'yingKouWeight',
                    sortable: true,
                    formatter: function (value, row) {
                        if(value === null){
                            return "--";
                        }
                        return parseFloat(value);
                    }
                }
            ]
        });
    });
</script>
</body>
</html>